<div class="type-list" id="sele_address" style="display:none;">
   	<form name="dataForm">
    <article class="service-select">
        <h3>可选服务<span>(可多选)</span></h3>
        <p><i class="iconfont icon-gantanhao"></i>如果你的企业涉及以下内容，请选择，不涉及请跳过</p>
        <div class="service clearfix">
            <div class="service-queue">
                <span>食品流通许可证</span>
                <span>￥500</span>
                <input type="checkbox" name="permit[]" value="120"/>
                <img class="none" src="__PUBLIC__/home/images/selected.png">
            </div>
            <div class="service-queue">
                <span>酒类批发许可证</span>
                <span>￥500</span>
                <input type="checkbox" name="permit[]" value="121"/>
                <img class="none" src="__PUBLIC__/home/images/selected.png">
            </div>
            <div class="service-queue">
                <span>医疗器械经营许可证</span>
                <span>￥500</span>
                <input type="checkbox" name="permit[]" value="122"/>
                <img class="none" src="__PUBLIC__/home/images/selected.png">
            </div>
        </div>
    </article>
    <article class="register-address">
        <h3>企业设立的注册地址</h3>
        <section class="flex-justify">
            <span>注册地址类型</span>
            <select name="selectaddr">
                <option value="">请选择地址</option>
                <option value="1">提供地址</option>
                <!-- <option value="2">独立地址</option> -->
                <option value="3">自有地址</option>
            </select>
        </section>
        <p class="address-tips"><i class="iconfont icon-gantanhao"></i>自有地址需为上海市地区所属地址</p>
        <p class="address-info none">注册地址：<span id="auto_address">中国(上海)自由贸易试验区富特北路211号号302部位368室</span></p>
	   	<input type="hidden" name="ouraddr" value=""/>
	   	<input type="hidden" name="packgoodsattr" value="0">
	   <a href="javascript:void(0)" onclick="save_address(this)" class="next-page">下一步</a>
    </article>
    </form>
<script type="text/javascript">
$(function(){
	$(".register-address select").change(function(){
        if($(this).val() == '3'){
            $(".address-tips").show();
            $(".address-info").hide();
        }else if($(this).val() == '1'){
            $(".address-tips").hide();
            $(".address-info").show();
            $.post('{:U("getAddress")}',{},function(data){
            	if(data.info != ''){
            		$('#auto_address').text(data.info);
            		$('input[name=ouraddr]').val(data.info);
            	}else{
            		$('#auto_address').text('中国(上海)自由贸易试验区富特北路211号号302部位368室');
            		$('input[name=ouraddr]').val('');
            	}
            });
        }
    });
})
function save_address(obj){
	$.post("{:U('Guide/memberSetData')}",$(obj).parents('form[name=dataForm]').serializeArray(),function(data){
		$('#preview_order').find('article').remove();
		$('#save_order').before(data);
		nextPage();
	})
}
</script>
</div>